import json


class ReadConfigUtil:

    @classmethod
    def read_config(cls, file_path, key):
        # 读取json文件操作
        # 定义一个空列表
        list1 = []
        with open(file_path, "r", encoding="utf-8") as f:
            data = json.load(f).get(key)
            # for循环遍历
            for item in data:
                temp = tuple(item.values())
                list1.append(temp)
        return list1


if __name__ == '__main__':
    print(ReadConfigUtil.read_config("../data/reg_login.json", "register"))
